package com.primb.bench.project.home.contract;

import android.content.Intent;

import com.primb.baselibs.base.BasePresenter;
import com.primb.bench.common.dialog.SelectListDialog;
import com.primb.bench.project.home.entity.ClientInfoEntity;
import com.primb.bench.project.home.entity.EnsureInfoEntity;
import com.primb.bench.project.home.entity.EnsureObjectEntity;
import com.primb.bench.project.home.entity.HttpStrEntity;
import com.primb.bench.project.home.entity.KeyEntity;
import com.primb.bench.project.home.entity.LoanInfoEntity;
import com.primb.bench.project.home.entity.TaxInfoEntity;

import java.util.List;

import rx.Observable;

/**
 * Created by Chen on 2017/5/4.
 * 功能描述：
 */

public class AddInfoContract {

    public interface View {

        void showLoading();

        void hideLoading();

        void showError(String msg);

        void showLayoutForType();

        void hideLayout();

        void setResultToCalculate(int requestCode, Object entity);

        void getEnsureInfo(int requestCode);

        void setDataToClientEntity(ClientInfoEntity entity);

        void setDataToLoanEntity(LoanInfoEntity entity);

        void setDataToTaxEntity(TaxInfoEntity entity);

        void setClientEntityToView(ClientInfoEntity entity);

        void setLoanEntityToView(LoanInfoEntity entity);

        void setEnsureEntityToView(EnsureInfoEntity entity);

        void setTaxEntityToView(TaxInfoEntity entity);

        SelectListDialog showPickerDialog(int code);

        void setDataToView(int code, KeyEntity dataDes);
    }

    public interface Presenter extends BasePresenter {

        void handleInfoForList(int code, KeyEntity data);

        void getPickerList(int code, String type);

        boolean isCheckEmpty(int requestCode);

        void onViewClick(int viewId, int requestCode);

        void setClientType(String clientType);
        void setPriceId(String priceId);
    }

    public interface Model {
        Observable<List<KeyEntity>> getPickerList(int code, String type);

        Observable<HttpStrEntity> deleteAllEnsureObject(String priceId);
    }
}